package com.iotechn.unimall.admin.api.goods;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.annotation.param.Range;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.dto.goods.ShopOneDTO;
import com.iotechn.unimall.data.model.Page;

import java.util.List;

/**
 * 监理打卡
 */
@HttpOpenApi(group = "admin.shopOne", description = "监理管理")
public interface AdminShopOneService {

    @HttpMethod(description = "添加")
    public String addShopOne(
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员Id") Long adminId,
            @HttpParam(name = "shopId", type = HttpParamType.COMMON, description = "shopId") Long shopId,
            @HttpParam(name = "qrCode", type = HttpParamType.COMMON, description = "qrCode") String  qrCode,
            @HttpParam(name = "address", type = HttpParamType.COMMON, description = "address") String address,
            @HttpParam(name = "type", type = HttpParamType.COMMON, description = "shopId") Integer  type,
            @HttpParam(name = "lgla", type = HttpParamType.COMMON, description = "shopId") String  lgla,
            @HttpParam(name = "img", type = HttpParamType.COMMON, description = "shopId") String  img

            ) throws ServiceException;

    @HttpMethod(description = "删除", permission = "admin:shopOne:delete", permissionParentName = "监理管理", permissionName = "监理打卡")
    public String deleteShopOne(
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员Id") Long adminId,
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "团购商品的Id") Long id) throws ServiceException;

    @HttpMethod(description = "查询", permission = "admin:shopOne:query", permissionParentName = "监理管理", permissionName = "监理打卡")
    public Page<ShopOneDTO> queryShopOne(
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员Id") Long adminId,
            @HttpParam(name = "id", type = HttpParamType.COMMON, description = "团购商品的ID") Long id,
            @HttpParam(name = "spuName", type = HttpParamType.COMMON, description = "团购商品的名称") String spuName,
            @HttpParam(name = "status", type = HttpParamType.COMMON, description = "团购商品的状态") Integer status,
            @Range(min = 1) @HttpParam(name = "page", type = HttpParamType.COMMON, description = "团购商品页码", valueDef = "1") Integer page,
            @Range(min = 1) @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "团购商品长度", valueDef = "20") Integer limit) throws ServiceException;

    @HttpMethod(description = "查询")
    public Page<ShopOneDTO> queryShopOneNew(
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员Id") Long adminId,
            @HttpParam(name = "shopName", type = HttpParamType.COMMON, description = "团购商品的名称") String shopName,
            @HttpParam(name = "shopId", type = HttpParamType.COMMON, description = "团购商品的名称") Long shopId,
            @HttpParam(name = "type", type = HttpParamType.COMMON, description = "") Integer  type,
            @Range(min = 1) @HttpParam(name = "page", type = HttpParamType.COMMON, description = "团购商品页码", valueDef = "1") Integer page,
            @Range(min = 1) @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "团购商品长度", valueDef = "20") Integer limit) throws ServiceException;

    @HttpMethod(description = "小程序查询")
    public List<ShopOneDTO> queryQiandao(
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员Id") Long adminId,
             @HttpParam(name = "shopId", type = HttpParamType.COMMON, description = "团购商品的名称") Long shopId,
            @HttpParam(name = "type", type = HttpParamType.COMMON, description = "") Integer  type);


}
